﻿<%@ Page Title="" Language="C#" MasterPageFile="~/RepairChecker.Master" AutoEventWireup="true" CodeBehind="jobstart.aspx.cs" Inherits="RepairChecker.jobstart" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ObjectDataSource ID="sourceJobs" runat="server" 
        SelectMethod="GetJobs" TypeName="RepairChecker.Entity">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="crewId" Type="Int32" />
            <asp:Parameter DefaultValue="0" Name="districtId" Type="Int32" />
            <asp:ControlParameter ControlID="chkNotified" DefaultValue="0" 
                Name="hideNotified" PropertyName="Checked" Type="Boolean" />
            
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:Panel ID="panelAdd" runat="server">
        网点：
        <asp:DropDownList ID="lstAddDistrict" runat="server" AutoPostBack="True" 
            onselectedindexchanged="lstAddDistrict_SelectedIndexChanged" Width="80px">
        </asp:DropDownList>
        <asp:DropDownList ID="lstOffice" runat="server" Width="200px">
        </asp:DropDownList>
        <br />
        故障：
         
        <asp:CheckBoxList ID="clstFault" runat="server" RepeatDirection="Horizontal" 
            RepeatLayout="Flow">
        </asp:CheckBoxList>
        <br />
        备注：<asp:TextBox ID="txtMemo" runat="server" Width="240px"></asp:TextBox>
        <br />
        <asp:Button ID="btnAdd" runat="server" Text="提交" onclick="btnAdd_Click" />
        <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
    </asp:Panel>
    <hr />
    <asp:Panel ID="panelNotify" runat="server">
    筛选：
        <asp:DropDownList ID="lstNotifyDistrict" runat="server">
        </asp:DropDownList>
        <asp:CheckBox ID="chkNotified" runat="server" Text="隐藏已通知报修" 
            AutoPostBack="True" />
        <asp:GridView ID="dataUnfinished" runat="server" AutoGenerateColumns="False" 
            DataSourceID="sourceJobs" 
            onrowcommand="dataUnfinished_RowCommand" DataKeyNames="FormId,CrewId" 
            onrowdatabound="dataUnfinished_RowDataBound" BackColor="White" 
            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
            ForeColor="Black" GridLines="Horizontal">
            <Columns>
                <asp:BoundField DataField="FormId" HeaderText="FormId" SortExpression="FormId" 
                    Visible="False" />
                <asp:ButtonField CommandName="btnDelete" Text="删" />
                <asp:BoundField DataField="DistrictName" HeaderText="区县" 
                    SortExpression="DistrictName" >
                </asp:BoundField>
                <asp:BoundField DataField="OfficeName" HeaderText="网点" 
                    SortExpression="OfficeName" />
                <asp:TemplateField HeaderText="故障内容">
                    <ItemTemplate>
                        <asp:BulletedList ID="lstFaults" runat="server">
                        </asp:BulletedList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="CallInDate" HeaderText="报修时间" 
                    SortExpression="CallInDate" />
                <asp:BoundField DataField="NotifyDate" HeaderText="通知时间" 
                    SortExpression="NotifyDate" />
                <asp:TemplateField HeaderText="倒霉孩子">
                    <ItemTemplate>
                        <asp:DropDownList ID="lstNotifyCrewName" runat="server">
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Memo" HeaderText="备注" SortExpression="Memo" />
                <asp:ButtonField ButtonType="Button" CommandName="btnNotify" Text="通知完成" />
            </Columns>
            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F7F7F7" />
            <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
            <SortedDescendingCellStyle BackColor="#E5E5E5" />
            <SortedDescendingHeaderStyle BackColor="#242121" />
        </asp:GridView>
    </asp:Panel>
</asp:Content>
